package net.lzzy.demo;

public class TestLambda {
    public static void main(String[] args) {
        MyFunction<String,Integer> myFunction =  s -> 3;

        MyFunction<String,String> myFunction1 =  s -> {
            return "hello "+s;
        };
        MyFunction<String,String> myFunction2 =  (String s) -> {
            return "hello " + s;
        };

        MyFunction<String,String> myFunction3 =  (String s) -> {
            return String.valueOf(3) + s;
        };
        System.out.println(myFunction.func("hello"));
        System.out.println(myFunction1.func("hello1"));
        System.out.println(myFunction2.func("hello2"));
        System.out.println(myFunction3.func("hello3"));
    }
}
